package com.xugongzhang.spring.beans;

import org.springframework.beans.factory.FactoryBean;

/**
 * @author X
 * @date 2022/12/3 20:41
 */
public class PersonFactoryBean implements FactoryBean<Person> {
    @Override
    public Person getObject() throws Exception {
        return new Person("1", "yue", 18);
    }

    @Override
    public Class<?> getObjectType() {
        return Person.class;
    }

    @Override
    public boolean isSingleton() {
        return true;
    }
}
